package com.kongjian.manage.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kongjian.manage.model.vo.DeptVO;
import com.kongjian.manage.common.R;
import com.kongjian.manage.model.dto.NewDeptDTO;
import com.kongjian.manage.model.dto.UpdateDeptDTO;
import com.kongjian.manage.model.query.DeptQuery;
import com.kongjian.manage.model.entity.DeptEntity;

/**
* @author tangjunfeng
* @Classname IDeptService.java
* @Description 部门service
* @Date 2023-10-10
* @Version V1.0
*/
public interface IDeptService extends IService<DeptEntity> {

    /**
    * 分页查询
    * @param query
    * @return
    */
    R<Page> queryPageDept(DeptQuery query)  throws Exception;


   /**
     * 根据实体查询VO对象
     * @param id ID
     */
    DeptVO getByIdDept(Long id) throws Exception;

   /**
    * 新增
    * @param deptDTO DTO
    */
    void addDept(NewDeptDTO deptDTO) throws Exception;


   /**
    * 更新
    * @param id ID
    * @param deptDTO DTO对象
    */
   void modifyDept(Long id,UpdateDeptDTO deptDTO) throws Exception;

   /**
    * 根据ID删除
    * @param id ID
    */
   void deleteDept(Long id) throws Exception;

   /**
    * 统计
    * @param query 查询实体
    */
   Integer countDept(DeptQuery query);

}
